package com.wondertek.service.mapper.sys;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import com.wondertek.service.entity.sys.SysDepartPo;
import io.lettuce.core.dynamic.annotation.Param;

import java.util.List;


/**
 * @author xqs
 */
public interface SysDepartMapper extends BaseMapper<SysDepartPo> {

    /**
     * 用户id查询部门
     * @param userId /
     * @return /
     */
    List<SysDepartPo> findListByUserId(@Param("userId") String userId);

    /**
     * 根据部门id查询本级完整上下级
     * @param departIds /
     * @return /
     */
    List<SysDepartPo> findAllListByDepartIds(@Param("departIds") List<String> departIds);

    /**
     * 根据部门id查询对应所有上级
     * @param departIds /
     * @return /
     */
    List<SysDepartPo> findParentListByDepartIds(@Param("departIds") List<String> departIds);

    /**
     * 根据部门id查询对应所有下级
     * @param departIds /
     * @return /
     */
    List<SysDepartPo> findChildListByDepartIds(@Param("departIds") List<String> departIds);
}
